<?php
require_once( '../system/mdao/Class_D_DNPW_AREA.php' );

$dao = new Class_D_DNPW_AREA;
$dao ->notdo_debug();
$dao -> setTableNameWeek($_GET['w']);
$pattern_cd = $_GET["p"];
$patternsort = $dao -> getPattern( $pattern_cd );


if ($dao ->isExitsTable()) {
	if  ( $patternsort == '3' ) {
		if ($dao ->exits( " pattern_cd = {$pattern_cd}")) {
			echo "1";
			exit;
		}else {
			echo "100";
			exit;
		}
	}
	if  ( $patternsort == '2' ) {
		if ($dao ->exitsPAT(  $pattern_cd )) {
			echo "1";
			exit;
		}else {
			echo "100";
			exit;
		}
	}
}else {
	echo "0";
	exit;
}
echo "0";
/*
 require_once( '../system/mdao/Class_D_DNPW_AREA_SHOP.php' );
$dao = new Class_D_DNPW_AREA_SHOP;
$dao -> setTableNameWeek($_GET['w']);

if ($dao ->isExitsTable()) {
	//if ($dao ->exits( "pattern_cd = {$_GET["p"]}")) {
	//	echo "1";
	//	exit;
	//}else {
		echo "100";
		exit;
	//}
}else {
	echo "0";
	exit;
}
*/
?>